home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_enscript.idb / usr / freeware / share / enscript / hl / mail.st.z / mail.st
Encoding:
Text File  |  2002-04-08  |  806 b   |  57 lines

  1. /**
  2.  * Name: mail
  3.  * Description: Mail and news articles.
  4.  * Author: Originally by Markku Rossi <mtr@iki.fi>, heavily modified
  5.  * by Matthew Weigel <weigel@pitt.edu>
  6.  */
  7.  
  8. state mail_body extends Highlight
  9. {
  10.   BEGIN {
  11.     reference_face (false);
  12.   }
  13.   /^[ \t]*>/ {
  14.     comment_face (true);
  15.     language_print ($0);
  16.     call (eat_one_line);
  17.     comment_face (false);
  18.   }
  19. }
  20.  
  21. state mail_header extends Highlight
  22. {
  23.   BEGIN {
  24.     reference_face (true);
  25.   }
  26.  
  27.   END {
  28.     comment_face (true);
  29.   }
  30.   /:/ {
  31.     language_print ($0);
  32.     return;
  33.   }
  34. }
  35.  
  36. state mail extends HighlightEntry
  37. {
  38.   /^[ \t]*$/ {
  39.     /* Move to the mail body. */
  40.     call (mail_body);
  41.   }
  42.  
  43.   /^/ {
  44.     reference_face (true);
  45.     language_print ($0);
  46.     call (mail_header);
  47.     comment_face (true);
  48.   }
  49. }
  50.  
  51.  
  52. /*
  53. Local variables:
  54. mode: c
  55. End:
  56. */
  57.